<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
	
	<script>
		//连接服务器
		var ws = new WebSocket("ws://localhost:8080/point1/zhangsan");
		
		ws.onopen = function(){
			console.log("成功连接服务器");
		}
		
		ws.onmessage = function(e){
			console.log("接收到服务端的消息： " + e.data);
		}
		
		ws.onerror = function(){
			
		}
		ws.onclose = function(){
			console.log("连接关闭");
		}
	</script>
</html>